package com.hmdp.utils;

import java.util.Calendar;

public class DateUtils {
    public static String getWeek(){
        Calendar calendar = Calendar.getInstance();
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
        String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
        String chineseDayOfWeek = weekDays[dayOfWeek - 1]; // 因为数组是从0开始，所以要减1
        return chineseDayOfWeek;
    }
}
